import pygame
image=pygame.image.load("coping.jpg")
image.set_colorkey((137,44,75))
import HorizontalPlatform

class Coping(HorizontalPlatform.HorizontalPlatform):
	def __init__(self,pos=(0,0),im=image,width=250):
		HorizontalPlatform.HorizontalPlatform.__init__(self,pos,im)
		self.image=pygame.transform.scale(im,(int(width),im.get_height()))
	def within_x_boundary(self,ox,ow):
		return HorizontalPlatform.HorizontalPlatform.within_x_boundary(self,ox,ow,k=0.33)
		#self.pos[0]<=ox+0.33*ow and ox-0.33*ow<=self.pos[0]+self.getWidth()
	'''def hasFallenOff_x(self,objecto):
		eps=5
		if self.pos[1]-eps<=objecto.y+objecto.getHeight()<=self.pos[1]+eps:
			objecto.x_cling=True
			objecto.rebound(objecto.x,self.pos[1]-objecto.getHeight())
		HorizontalPlatform.HorizontalPlatform.hasFallenOff_x(self,objecto)'''